#pragma once

#include "../../element_manager.h"
#include "../group.h"

namespace burn {

class GRegion : public GGroup {
public:
  /**
   * 设置EngineType信息
   * @param type
   * @return
   */
  GRegion *setGEngineType(GEngineType type);

protected:
  explicit GRegion();
  ~GRegion() override;

  CStatus init() final;
  CStatus run() final;
  CStatus destroy() final;

  CStatus addElement(GElementPtr element) final;

  CVoid dump(std::ostream &oss) final;

private:
  GElementManagerPtr manager_ =
      nullptr; // region 内部通过 manager来管理其中的 element 信息

  CGRAPH_NO_ALLOWED_COPY(GRegion)

  friend class GPipeline;
  friend class UAllocator;
};

using GRegionPtr = GRegion *;

} // namespace burn